An attempt to take a counting semaphore is blocked only if all of the available resources are in use 仅仅在所有可用的资源都被用完了时才阻塞。
Windows semaphores are counting semaphores , which can be used to control access to a pool of resources Windows信号量是计数信号量,可用于控制对资源池的访问。
One way to control access to a pool of resources rather than just with a simple one - thread lock is to use what is known as a counting semaphore 一种控制访问一组资源的方法(除了简单地上锁之外) ,就是使用众所周知的信号量计数( counting semaphore ) 。